@inherits MiniRazor.TemplateBase<CodeModule>
@namespace MicroCloud.CodeGeneration.Generates
@using System;
@using System.Collections.Generic;
@using System.Linq;
@using MicroCloud.CodeGeneration
@using MicroCloud.CodeGeneration.Database
@using MicroCloud.CodeGeneration.Dtos
@using MicroCloud.CodeGeneration.Entities
@using MicroCloud.CodeGeneration.Generates
@{
    CodeModule module = Model;
}

namespace @(module.Namespace)
{
    /// &lt;summary&gt;
    /// @(module.Name)接口服务
    /// &lt;/summary&gt;
    public partial class @(module.Name)Service : I@(module.Name)Contract
    {
        /// <summary>
        /// 初始化一个<see cref="@(module.Name)Service" />类型的新实例
        ///</summary>
        public @(module.Name)Service(IServiceProvider provider)
        {
            ServiceProvider = provider;
            Logger = provider.GetLogger(GetType());
        }

        #region 属性
        /// <summary>
        /// 获取 服务提供者对象
        ///</summary>
        protected IServiceProvider ServiceProvider { get; }

        /// <summary>
        /// 获取 日志对象
        ///</summary>
        protected ILogger Logger { get; }

        /// <summary>
        /// 获取 事件总线
        ///</summary>
        protected IEventBus EventBus => ServiceProvider.GetService<IEventBus>();

        #endregion

    }
}